package xin.marcher.module.common.constants.inventory;

/**
 * 缓存key
 */
public class TairInventoryConstant {

    /**
     * 卖家中心桶库存 锁
     * key：skuId
     */
    public static final String SELLER_INVENTORY_LOCK_PREFIX = "seller_inventory_lock:";
    /**
     * 卖家中心桶库存
     * key：skuId
     */
    public static final String SELLER_INVENTORY_PREFIX = "seller_inventory:";
    /**
     * 卖家商品当前剩余库存
     * key：skuId
     */
    public static final String SELLER_INVENTORY_RESIDUE_PREFIX = "seller_inventory_residue:";
    /**
     * 卖家商品的分桶下线阈值
     * key：skuId
     */
    public static final String SELLER_INVENTORY_THRESHOLD_PREFIX = "seller_inventory_threshold:";
    /**
     * 卖家商品分桶的下线创建时间
     * key：skuId
     */
    public static final String SELLER_BUCKET_OFFLINE_CREATE_TIME_PREFIX = "seller_bucket_create_offline_time:";

    /**
     * 卖家商品分桶的最大下线消耗时间
     * key：skuId
     */
    public static final String SELLER_BUCKET_OFFLINE_TIME_PREFIX = "seller_bucket_offline_time:";
    /**
     * 卖家分桶元数据信息
     * key：skuId
     */
    public static final String SELLER_BUCKET_PREFIX = "seller_bucket:";
    /**
     * 卖家分桶元数据刷新锁
     * key：skuId
     */
    public static final String SELLER_SYNC_BUCKET_PREFIX = "seller_sync_bucket_lock:";

    /**
     * 某个卖家下 商品被请求扣减的次数
     */
    public static final String SELLER_SKU_STOCK_COUNT_PREFIX = "seller_sku_stock_count:";

    /**
     * 某个卖家下 商品购买的详细信息缓存
     */
    public static final String SELLER_SKU_TRADE_DETAIL_PREFIX = "seller_sku_trade_detail:";

    /**
     * 分桶操作成功标志
     */
    public static final String BUCKET_OPERATE_PREFIX = "bucket_operate:";

    /**
     * 分桶扩容失败次数
     */
    public static final String BUCKET_CAPACITY_FAIL = "bucket_capacity_fail:";

    /**
     * 操作set失败
     */
    public static final String OPERATE_SET_FAIL = "operate_set_fail";

    /**
     * 操作自增失败
     */
    public static final String OPERATE_INCR_FAIL = "operate_incr_fail";

    /**
     * 分桶操作执行
     */
    public static final String BUCKET_OPERATE_PROCESS = "bucket_operate_process";

    /**
     * 分桶操作执行数量
     */
    public static final String BUCKET_OPERATE_PROCESS_COUNT = "bucket_operate_process_count";

    /**
     * 清空分桶任务执行数量
     */
    public static final String BUCKET_OPERATE_CLEAR_PROCESS_COUNT = "bucket_operate_clear_process_count";

    /**
     * 清空分桶任务完成锁
     */
    public static final String BUCKET_OPERATE_CLEAR_PROCESS = "bucket_operate_clear_process";
}
